home *** CD-ROM | disk | FTP | other *** search
- /*
-
-
- TIME.C affichage HTML de l'heure et la date sur la sortie standard
-
-
- */
-
-
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <time.h>
-
- #ifdef __SOZOBONX__
- #include <atari.h>
- #else
- #include <tos.h>
- #endif
-
- #include <portab.h>
-
- /* --- Includes internes -- */
-
- /* --- Constantes globales internes --- */
-
- /* --- Structures globales internes --- */
-
- /* --- Variables globales internes --- */
-
- /* --- Prototypage interne --- */
-
- VOID main(VOID);
-
- /************************************************************************/
-
- VOID main(VOID)
- {
- BYTE str_today[20];
- ULONG ul_today;
-
- time(&( (time_t)(ul_today) ));
- strftime(str_today,20,"%d %b %y %X",localtime(&((time_t)(ul_today))));
-
- fprintf(stdout,"Content-type: text/html\n\n");
-
- fprintf(stdout,"<html><head><title>A l'Heure du jour</title></head><Body><h3>A l'heure du jour</h3><hr><pre>\n");
- fprintf(stdout,"La pendule indique : %s\n",str_today);
-
- fprintf(stdout,"</pre></body></html>\n");
-
- }
-